package com.casit.base.util;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

public class FeignMappingUitls {
    public static Map<String,Object> HttpServletRequestToMap(HttpServletRequest request){
        Map<String, String[]> parameterMap= request.getParameterMap();
        Map<String,Object> paramMap=new HashMap<String,Object>();
        Iterator<Map.Entry<String, String[]>> it = parameterMap.entrySet().iterator();
        while (it.hasNext()) {
            Map.Entry<String, String[]> entry = it.next();
            paramMap.put(entry.getKey(),entry.getValue()[0]);
        }
        return  paramMap;
    }
}
